package com.ehome.poct.core.api.mapping;


import com.ehome.poct.core.api.dto.message.OriginCheckOrderMsg;
import com.ehome.poct.core.api.dto.message.QueueMessageOriginDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

@Mapper(componentModel = "spring")
public interface CheckEventMapping {

    /**
     * 金标仪检测支付完毕订单ID消息
     */
    @Mappings({
            @Mapping(constant = "poct", target = "pubAuthor"),
            @Mapping(constant = "260", target = "type"),
            @Mapping(constant = "金标仪检测支付完毕订单ID消息", target = "title"),
            @Mapping(constant = "com.ehome.check.system.msgprocess", target = "receivePackageId"),
            @Mapping(source = "publishTime", target = "publishTime"),
            @Mapping(source = "data", target = "data")})
    QueueMessageOriginDTO<OriginCheckOrderMsg> toOrderEvent(String publishTime, OriginCheckOrderMsg data);
}
